<template>
  <div>
    <KunkkaSimpleTable
      :name="name"
      :handle="handle"
      :columns="columns"
      :data="data"
      :pagination="pagination"
      :is-table-setting="true"
      show-overflow="tooltip"
      hasrightclickmenu
      single
      @toggleSelectRow="toggleSelectRow"
      @toggleDblclickRow="toggleDblclickRow"
    >
      <template v-slot:action>
        <ux-table-column fixed="right" title="状态" width="135" class-name="customSlot" resizable>
          <template slot-scope="scope">

            <div>toolbar</div>

          </template>
        </ux-table-column>
      </template>
    </KunkkaSimpleTable>
    <div class="markdown-body">
      <readme />
    </div>
  </div>
</template>

<script>
import Readme from './readme.md'
export default {
  name: 'SimpletableDoc',
  components: { Readme },
  data() {
    return {
      name: 'test',
      pagination: {
        page: 1,
        rows: 100,
        total: 0
      },
      columns: [
        {
          label: '工号1',
          prop: 'gonghao1',
          type: 'input',
          show: true,
          width: '100px'
        },
        {
          label: '姓名4',
          prop: 'gonghao2',
          type: 'input',
          show: true
        },
        {
          label: '姓名3',
          prop: 'gonghao3',
          type: 'input',
          show: true
        },
        {
          label: '姓名2',
          prop: 'gonghao4',
          type: 'select',
          show: true
        }
      ],
      handle: [
        {
          label: '新增',
          vaild: true
        },
        {
          label: '修改'
        }
      ],
      data: [
        {
          gonghao: '1111111111111111111111111111111111111111'
        }
      ],
      timelineList: null,
      rightComplete: false,
      leftComplete: false
    }
  },
  methods: {
    toggleSelectRow() {
      console.log(1)
    },
    toggleDblclickRow(row, column, event) {
      console.log(row, column, event)
    }
  }
}
</script>

<style></style>
